prepare("select * from serviceitems where names = '$names'") ; $chk->execute(); if($chk->rowcount() > 0) { $msg = $names ."This Services is Already Registered, register another" ; } else { if($user->regserviceitems($names)) { $msg = $names.'-'."Registered Successfully" ; } } } ?>